Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 3 - QuickDraw 3D Objects / QuickDraw 3D Objects Reference
QuickDraw 3D Objects Routines / Managing Objects


Q3Object_Dispose

You can use the Q3Object_Dispose function to dispose of a QuickDraw 3D object.

TQ3Status Q3Object_Dispose (TQ3Object object);
object
A QuickDraw 3D object.
DESCRIPTION
The Q3Object_Dispose function disposes of the QuickDraw 3D object specified by the object parameter. If the specified object is not a shared object, QuickDraw 3D disposes of any memory occupied by that object. If the specified object is a shared object, QuickDraw 3D reduces by 1 the reference count associated with that object. When the reference count is reduced to 0, Q3Object_Dispose disposes of the memory occupied by the object.

In general, you need to call Q3Object_Dispose for any objects returned by a Get call (for example, Q3View_GetDrawContext). Failure to call Q3Object_Dispose on such objects will result in a memory leak.

ERRORS
kQ3ErrorInvalidObject


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996